Image forming apparatus having plurality of processing units for generating intermediate data, and method for controlling the image forming apparatus

ABSTRACT

When the generation of intermediate data of the following page is completed before the generation of intermediate data of the preceding page, the rasterization of the intermediate data of the following page is performed after completion of the generation and rasterization of the intermediate data of the preceding page.

BACKGROUND

Field of the Disclosure

The present disclosure relates to a technique for generatingintermediate data by using a plurality of processing units.

Description of the Related Art

In the rasterization based on print data (page description language(PDL) data) described in a page description language, intermediate datadescribed in an intermediate language is generated based on PDL data andthen the intermediate data is rasterized into a raster image. JapanesePatent Application Laid-Open No. 2012-16842 discusses a technique usedby a printer mounting a multi-core central processing unit (CPU) havinga plurality of processor cores to parallelly perform the rasterizationon different pages. More specifically, each processor core issequentially assigned a rasterization target page, generatesintermediate data based on the PDL data of the assigned page, and thenrasterizes the intermediate data to generate a raster image of the page.Then, the raster image is transmitted to a printer engine and thenprinted.

In a conventional printer, a plurality of processor cores performs therasterization for respective different pages. Therefore, theconventional printer performs the following control to cause the orderof pages to be printed to coincide with the order of pages of the PDLdata. Even when one processor core first completes the rasterization ofthe following page, the one processor core waits until the otherprocessor core completes the rasterization of the preceding page and thetransmission of a raster image to a printer engine, and then transmits araster image of the following page to the printer engine.

More specifically, in the conventional printer, the raster imageresulting from the rasterization of the following page is continuouslystored in a memory until the raster image of the preceding page isgenerated. Therefore, the printer requires an amount of memorysufficient for storing these raster images.

SUMMARY

According to an aspect of the present invention, an image formingapparatus includes, a receiving unit configured to receive PDL dataincluding a plurality of pages, a plurality of processing unitsconfigured to generate, on a page basis, intermediate data of theplurality of pages based on the PDL data, a rasterizing unit configuredto rasterize the intermediate data of the plurality of pages generatedby the plurality of processing units, and a printing unit configured toprint the rasterized pages. In a case where generation of intermediatedata of a following page is completed before generation of intermediatedata of a preceding page, a rasterization of the intermediate data ofthe following page by the rasterizing unit is controlled so that therasterization of the intermediate data of the following page is delayeduntil the generation and rasterization of the intermediate data of thepreceding page are completed.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a hardware configuration of an image formingapparatus.

FIG. 2 illustrates a software configuration of the image formingapparatus.

FIG. 3 is a schematic view illustrating pipeline parallel processing andpage parallel processing.

FIG. 4 is a flowchart illustrating control for selecting betweenpipeline parallel processing and page parallel processing according to afirst exemplary embodiment.

FIG. 5 is a flowchart illustrating processing performed by a pipelinepage description language (PDL) thread.

FIG. 6 is a flowchart illustrating processing performed by a pipelinedisplay list (DL) thread.

FIG. 7 is a flowchart illustrating processing performed by a page DLthread.

FIG. 8 is a flowchart illustrating control for switching betweenpipeline parallel processing and page parallel processing according to asecond exemplary embodiment.

DESCRIPTION OF THE EMBODIMENTS

An image forming apparatus according to a first exemplary embodimentwill be described below with reference to the accompanying drawings.According to the present exemplary embodiment, the image formingapparatus having a plurality of processing units enables performing pageorder control with a smaller amount of memory.

<Hardware Block Diagram of Image Forming Apparatus>

FIG. 1 is a hardware block diagram illustrating a configuration of theimage forming apparatus (printing apparatus) according to the presentexemplary embodiment. Referring to FIG. 1, a controller unit 100includes a central processing unit (CPU) 101, a random access memory(RAM) 102, a read only memory (ROM) (not illustrated), a hard disk drive(HDD) 103, a network interface (I/F) 104, a raster image processor (RIP)106, and a device I/F 107. The controller unit 100 receives print data(PDL data) described in the PDL from an external apparatus (for example,a host personal computer (PC)) connected with a network 105 such as alocal area network (LAN) via the network I/F 104. The controller unit100 also connects with a printer engine 108 via the device I/F 107 tocontrol input and output of image signals and device information.

The CPU 101 loads a program stored in the HDD 103 into the RAM 102 andthen executes it. The CPU 101 further totally controls each deviceconnected to a system bus 109 according to the program. The CPU 101, amulti-core CPU having a plurality of processor cores, parallellyperforms intermediate data (display list (DL)) generation (conversion)based on PDL data on a multi-thread basis. The CPU 101 converts PDL datainto a DL having a common format in order to use subsequent processingin common even when there are various types of PDL data. Multithread(described below) refers to an operation in which the respectiveprocessor cores included in the CPU 101 function as different threads.More specifically, multi-thread is equivalent to an operation in whichdifferent threads perform processing and different processor coresperform different processing. It is also possible to use a CPU capableof utilizing a technique for simulating a plurality of processor coreswith one processor core by effectively using idle time of registers andpipeline circuits in the CPU, such as hyper-threading.

The RAM 102 functions as a main memory of the CPU 101, a work memory,and a memory for storing DLs (hereinafter referred to as a DL storagememory). The DL storage memory is a memory area allocated in the RAM102, having a predetermined data size for storing DLs for a plurality ofpages. A maximum value is predetermined for the data size of a DL forone page. As described below, if, during the DL generation for a certainpage, the data size of the generated DL of the relevant page exceeds themaximum value, a DL thread (DL thread generation unit) once stops the DLgeneration and then generates a raster image based on the generated DLby using the RIP 106. Then, the DL thread deletes the generated DL toallocate a free space in the DL storage memory, compresses the generatedraster image, and stores the compressed raster image, as a DL, in theallocated free space in the DL storage memory. Then, the DL threadresumes the DL generation for the relevant page. This series ofprocessing is referred to as fall back processing. Based on the fallback processing, the DL thread prevents the DL data size for one pagefrom exceeding the predetermined maximum value. A part of the RAM 102also functions as a buffer 204 (described below). The HDD 103 is used tostore mass data on a temporarily or on a long-term basis.

The RIP 106, also referred to as a rasterizer, performs the raster imagegeneration (rasterization into bit map data) based on a DL generated bythe CPU 101. The RIP 106 sequentially receives, on a page basis, DLstransmitted in the order of pages by the CPU 101 and then rasterizes theDLs in the order of pages, as described below. The RIP 106 performs theDL rasterization in parallel with the DL generation by the CPU 101 on apage basis. More specifically, in parallel with the DL generation forthe subsequent page (following page) by the CPU 101, the RIP 106performs the DL rasterization on the previous page (preceding page). Araster image generated through the DL rasterization is sent to theprinter engine 108.

The printer engine 108 includes an engine I/F (not illustrated) forsequentially converting each of raster images transmitted from thecontroller unit 100 into an image signal. The printer engine 108 is aprinting unit for printing an image on a sheet such as paper based onthe image signal. The printing process of the printer engine 108 may bean electrophotographic process and an ink-jet process, and is notlimited to a certain process.

<Software Module Diagram of Image Forming Apparatus>

FIG. 2 illustrates a software configuration of the image formingapparatus according to the present exemplary embodiment. Each softwaremodule illustrated in FIG. 2 is implemented when the above-describedprogram stored in the HDD 103 is loaded into the RAM 102 and thenexecuted by the CPU 101.

A parallel control unit 200 divides image forming processing for PDLdata into predetermined units, and assigns respective units of imageforming processing to a plurality of threads. Processing inpredetermined units includes the processing of the DL generation for onepage based on the PDL data, the processing of the PDL datainterpretation for one object, and the processing of the DL generationbased on the result of the PDL data interpretation for one object. Theparallel control unit 200 according to the present exemplary embodimentmay initialize the buffer 204, and assign to a thread 1 the processingof the PDL data interpretation for one object and the processing ofstoring the interpretation result in the buffer 204. More specifically,the thread 1 is a pipeline PDL thread which functions as aninterpretation unit 201. The parallel control unit 200 may assign to athread 2 the processing of the DL generation based on the result of thePDL data interpretation for one object stored in the buffer 204. Morespecifically, the thread 2 is a pipeline DL thread which functions as ageneration unit 203. The parallel control unit 200 may assign to athread 3 the processing of the PDL data interpretation for all objectsincluded in a certain page and the processing of the DL generation basedon the interpretation result. More specifically, the thread 3 is a pageDL thread which functions as an interpretation unit 211 and a generationunit 213. The parallel control unit 200 may assign to a thread 4 theprocessing of the PDL data interpretation for all objects included inanother page and the processing of the DL generation based on theinterpretation result. More specifically, the thread 4 also is a page DLthread which functions as the interpretation unit 211 and the generationunit 213. The thread 4 differs from the thread 3 in the DL generationtarget page.

The term “object” refers to a text object including a plurality ofcharacters, a line segment object determined by specifying thecoordinates of both ends of a line segment, or a bit map object.

In the present exemplary embodiment, the interpretation unit 201performs the processing of the PDL data interpretation for objects. Theinterpretation unit 201 interprets the PDL data for each object and thenstores the interpretation result in a work memory. The result ofinterpretation for one object included in the PDL data is temporarilystored in the work memory, and then overwritten by the result of the PDLdata interpretation for one object subsequently performed.

Meanwhile, the interpretation unit 211 interprets the PDL data and thenstores the interpretation result in the work memory similar to theinterpretation unit 201, and the interpretation unit 211 subsequentlytransmits the interpretation result to the buffer 204.

In the present exemplary embodiment, the generation unit 203 performsthe processing of the DL generation for objects based on theinterpretation result. The generation unit 203 generates a DL based onthe result of the PDL data interpretation. The generation unit 203acquires the interpretation result from the work memory of theinterpretation unit 201. Whereas, unlike the generation unit 203, thegeneration unit 213 acquires the interpretation result not from the workmemory, but from the buffer 204.

Although, in the present exemplary embodiment, each software module isimplemented as described above when the CPU 101 executes a program, thepresent invention is not limited thereto. The function of each softwaremodule may be implemented by hardware. Although the four threads 1 to 4are illustrated in FIG. 2, one thread may perform the operation ofanother thread. For example, although the thread 1 serves as a pipelineDL thread in the case of pipeline parallel processing (described below),the thread 1 may serve as a page DL thread similar to the thread 3 inthe case of page parallel processing. This also applies to the threads 2and 4.

The present exemplary embodiment switches between two different types ofparallel processing to achieve the improved processing speed based onparallel processing not only with print data of a plurality of pages butalso with print data of only one page.

One type of parallel processing is pipeline processing in which theprocessing of the interpretation unit 201 and the processing of thegeneration unit 203 are implemented by a pipeline control unit 202 basedon different threads. More specifically, for the first page, whengenerating a DL for one object, a thread assigned the processing of thePDL data interpretation for the object and a thread assigned theprocessing of the DL generation based on the interpretation result areparallelly executed through pipeline processing. More specifically,while a thread which functions as the generation unit 203 is generatinga DL based on the result of the PDL data interpretation for a certainobject, another thread which functions as the interpretation unit 201interprets the PDL data of the following object. Then, the thread whichfunctions as the generation unit 203 generates a DL based on theinterpretation result by the another thread. The above-described seriesof processing is repeated for one page. This processing is referred toas pipeline parallel processing.

For each of the second and the subsequent pages, the other type ofparallel processing limits the number of threads which function as theinterpretation unit 211 and the generation unit 213 to one. A pluralityof threads for generating respective DLs of a plurality of pages isparallelly executed on a page basis. More specifically, a certain threadgenerates a DL based on the PDL data of a certain page, and anotherthread generates a DL based on the PDL data of another page. Thisprocessing is referred to as page parallel processing.

<Overview of Switching Between Page Parallel Processing and PipelineParallel Processing>

In page parallel processing based on a multi-core CPU, based on themulti-page PDL data, different threads (processor cores) parallellygenerate DLs of different pages, and therefore effects of the processingspeed improvement through multi-threaded parallel processing can beobtained. On the other hand, in page parallel processing performed bythe multi-core CPU on the single-page PDL data, a certain thread(processor core) performs the DL generation based on the PDL data of thefirst page. However, each of the remaining threads (processor cores)enters the idle state in which the relevant thread performs neither thePDL data interpretation nor the DL generation, and therefore effects ofmulti-threaded (multi-core-based) parallel processing cannot be obtainedfor the DL generation based on the single-page PDL data.

In the present exemplary embodiment, therefore, the DL generation isperformed on the first page of the PDL data through pipeline parallelprocessing, and the DL generation is performed on the second andsubsequent pages thereof through page parallel processing. Thus, effectsof multi-threaded parallel processing can be obtained not only with themulti-page PDL data but also with the single-page PDL data. FIG. 3 is aconceptual view illustrating this processing.

Pipeline parallel processing is performed as processing for the firstpage. For example, when objects 1 and 2 are included in the PDL data ofthe first page, the thread 1 (processor core 1) interprets the PDL dataof the object 1, and the thread 2 (processor core 2) subsequentlygenerates a DL of the object 1 based on the interpretation result.During the DL generation, the thread 1 interprets the PDL data of theobject 2, and the thread 2 that has generated a DL of the object 1generates a DL of the object 2 based on the interpretation result. Thus,the processing of respective threads can be parallelly performed,achieving the processing speed improvement for the DL generation for thefirst page.

Page parallel processing is performed in processing for the second andthe third pages. For example, when the objects 3 and 4 are included inthe PDL data of the second page, the thread 1 subsequently performs thePDL data interpretation and the DL generation for the object 3. Thisalso applies to the object 4. Thus, a DL of the second page isgenerated. On the other hand, for example, when the objects 5 and 6 areincluded in the PDL data of the third page, the thread 2 subsequentlyperforms the PDL data interpretation and the DL generation for theobject 5. This also applies to the object 6. Thus, a DL of the thirdpage is generated. The processing of respective threads can beparallelly performed on a page basis in this way, achieving theprocessing speed improvement in the DL generation for the second and thethird pages. Although pipeline parallel processing may also be appliedto the second and the third pages similar to the first page, in thepresent exemplary embodiment such processing is not performed because ofthe following reason. Since multi-threaded pipeline parallel processingrequires communication between threads, the communication cost inpipeline parallel processing is larger than that in page parallelprocessing.

<Flow of Parallel Processing Switching Control>

A control flow for switching between page parallel processing andpipeline parallel processing will be described below with reference tothe flowchart illustrated in FIG. 4. This control flow is performed bythe parallel control unit 200 when a thread A receives the PDL data froman external apparatus via the network I/F 104.

In step S401, the parallel control unit 200 performs initializationprocessing. More specifically, the parallel control unit 200 manages theDL generation target page number and the DL transmission target pagenumber, and sets both page numbers to 1. The parallel control unit 200further activates a plurality of threads corresponding to the number ofprocessor cores of the multi-core CPU. The parallel control unit 200further allocates the buffer 204. For example, when there are two coreCPUs, two different threads are activated. In the subsequent processing,the parallel control unit 200 sets an affinity mask so that therespective activated threads are executed by different processor cores.

In step S403, the parallel control unit 200 determines whether the DLgeneration target page number is 1, i.e., whether or not the DLgeneration target is the first page. When the DL generation target pagenumber is 1 (YES in step S403), then in step S404 and subsequent steps,the parallel control unit 200 performs the DL generation andtransmission on the first page through pipeline parallel processing. Thepipeline parallel processing is as described above with reference toFIG. 3. On the other hand, when the DL generation target page number isnot 1 (NO in step S403), then in step S410 and subsequent steps, theparallel control unit 200 performs the DL generation and transmission onthe second and subsequent pages through page parallel processing. Thefirst page is a predetermined page to be handled differently from thesecond and subsequent pages, and the second and subsequent pages arepages other than the predetermined page. The parallel control unit 200is a generation control unit for controlling the parallel processingmethod depending on whether or not the DL generation target page is thepredetermined page.

Processing in step S404 and subsequent steps for pipeline parallelprocessing will be described below.

In step S404, the parallel control unit 200 instructs a plurality of theactivated threads to cooperatively perform pipeline parallel processingon the PDL data of the DL generation target page number. For example,the parallel control unit 200 instructs the thread 1 to perform theprocessing of the PDL data interpretation for objects out of pipelineparallel processing. At this time, the thread 1 functions as theinterpretation unit 201. Meanwhile, the parallel control unit 200instructs the thread 2 to perform the processing of the DL generationfor objects based on the result of the PDL data interpretation for theobjects out of pipeline parallel processing. At this time, the thread 2functions as the generation unit 203.

In step S405, the parallel control unit 200 increments the DL generationtarget page number by one to set the second page as the DL generationtarget page. As described below, the parallel control unit 200 instructsthe generation unit 203 to allocate a memory area having the maximumvalue of the DL data size for one page in the DL storage memory.

In step S406, the parallel control unit 200 determines whether a DLgeneration completion notification for the first page has been receivedfrom a thread currently performing pipeline processing. When therelevant notification has been received (YES in step S406), theprocessing proceeds to step S407. The relevant completion notificationincludes the memory address for storing the DL of the first page. Therelevant completion notification also includes the page number of thegenerated DL, which is “first page” in this case. On the other hand,when the relevant notification has not been received (NO in step S406),the parallel control unit 200 waits for reception of the DL generationcompletion notification for the first page. The reason why the parallelcontrol unit 200 waits for the relevant notification only for the firstpage is to improve the processing efficiency for the first page by notperforming processing for the following page during pipeline parallelprocessing for the first page.

In step S407, the parallel control unit 200 transmits the DL with thetransmission target page number (i.e., the DL of the first page) to theRIP 106. The transmitted DL is rasterized by the RIP 106. Morespecifically, the parallel control unit 200 notifies the RIP 106 of thememory address included in the relevant completion notification. The RIP106 acquires the DL stored in the memory address and then rasterizes it.Then, upon detection of completion of the DL rasterization for the firstpage, the parallel control unit 200 instructs the generation unit 203serving as a DL thread to release the memory area allocated on the DLstorage memory. The generated raster image is sent to the printer engine108 and then printed on paper.

In step S408, the parallel control unit 200 increments the transmissiontarget page number by one to set the second page as the DL transmissiontarget page. Then, the processing proceeds to step S409.

Page parallel processing in step S410 and subsequent steps will bedescribed below.

In step S410, the parallel control unit 200 repeats steps S411 to S413until there is no thread (empty thread) to which no processing isassigned.

In step S411, the parallel control unit 200 determines whether it hasinstructed relevant threads to perform the processing of the DLgeneration through page parallel processing for all pages included inthe PDL data. When the parallel control unit 200 has instructed relevantthreads to perform the processing of the DL generation for all pages(YES in step S411), the processing exits the loop in step S410 andproceeds to step S414. On the other hand, when the parallel control unit200 has not instructed relevant threads to perform the relevantprocessing for all pages (NO in step S411), the processing proceeds tostep S412. In addition to the processing in step S411, the parallelcontrol unit 200 may calculate the total size of DLs untransmitted tothe RIP 106 (unrasterized DLs), out of DLs for pages generated so far.When the total size is smaller than a threshold value (NO in step S411),the processing may proceed to step S412. On the other hand, when thetotal size is equal to or greater than the threshold value (YES in stepS411), the processing may proceed to step S414. By restraining the DLgeneration with reference to the total size of untransmitted DLs in thisway, it is possible to prevent the shortage of the DL storage memory andbuffer overflow even when the DL generation for a page with a smallerpage number is remarkably delayed and the DL generation for another page(a page with a larger page number than the relevant smaller page number)is performed before the DL generation for the page with the relevantsmaller page number. This control may be performed based not on thetotal size of generated and unrasterized DLs but on the number of pagesof generated and unrasterized DLs. For example, when the number of pagesof generated and unrasterized DLs is smaller than a threshold value (NOin step S411), the processing proceeds to step S412. On the other hand,when the relevant number is equal to or greater than the threshold value(YES in step S411), the processing proceeds to step S414. Alternatively,the parallel control unit 200 determines whether the free capacity ofthe DL storage memory is sufficient for allocating a memory area havingthe maximum value of the DL data size for one page. More specifically,the parallel control unit 200 determines whether the relevant freecapacity is equal to or greater than a predetermined threshold value(maximum value). When the relevant free capacity is sufficient forallocating the relevant memory area (NO in step S411), the processingproceeds to step S412. On the other hand, when the relevant freecapacity is not sufficient (YES in step S411), the processing proceedsto step S414. The relevant free capacity refers to the capacity of ausable or released memory area in the DL storage memory, and can beobtained as follows. More specifically, the relevant free capacity isobtained by subtracting “the total size of the memory area allocated forgenerated and unrasterized DLs on a page basis” from the predetermineddata size pre-allocated as the DL storage memory. Instead of “the totalsize of the memory area allocated for generated and unrasterized DLs ona page basis”, “the total size of generated and unrasterized DLs” may beused.

In step S412, the parallel control unit 200 assigns to an empty threadthe processing of the DL generation for the page with the DL generationtarget page number to perform the relevant processing through pageparallel processing. More specifically, the thread assigned theprocessing of the DL generation performs the PDL data interpretation foreach object included in the page and performs the DL generation based onthe interpretation result. Performing processing in this way enablesparallelly performing the processing of the DL generation on a pagebasis, making it possible to quickly generate DLs of a plurality ofpages included in the PDL data. For example, when the thread 1 is anempty thread, the thread 1 functions as the interpretation unit 211 andthe generation unit 213. This also applies to a case where the thread 2is an empty thread. As described below, the parallel control unit 200instructs the generation unit 213 to allocate a memory area having themaximum value of the DL data size of one page on the DL storage memory.

In step S413, the parallel control unit 200 increments the DL generationtarget page number by one to set the next page as the DL generationtarget page.

This completes descriptions of the loop processing.

In step S414, the parallel control unit 200 determines whether the DLgeneration completion notification has been received from the threadcurrently performing page parallel processing. When the relevantnotification has been received (YES in step S414), then in step S415,the parallel control unit 200 transmits the generated and untransmittedDL to the RIP 106. On the other hand, when the relevant notification hasnot been received (NO in step S414), the processing proceeds to stepS409. The relevant completion notification includes the storagedestination memory address and the page number (for example, the secondpage, the third page, or the like) of the generated DL. The page numberis managed by the parallel control unit 200 as the page number of thegenerated DL.

In step S415, the parallel control unit 200 determines whether the DLgeneration for the transmission target page number has already beencompleted, based on the page number of the generated DL and thetransmission target page number. More specifically, the parallel controlunit 200 determines whether the generated DL can be transmitted(delivered) to the RIP 106 in the order of pages (from the startingpage). The transmission target page number just indicates the pagenumber for the DL which should be rasterized by the RIP 106 this time.When the DL generation for the transmission target page number hasalready been completed (YES in step S415), the processing proceeds tostep S416. On the other hand, when the relevant DL generation has notbeen completed (NO in step S415), the processing proceeds to step S409.When the processing proceeds to step S409, the DL of the page numberincluded in the completion notification received in step S414 remainsstored in the storage destination memory. However, this storage formprovides larger effects of memory saving than the storage form after theconversion (i.e., in the form of raster images).

In step S416, the parallel control unit 200 transmits the DL with thetransmission target page number to the RIP 106. The transmitted DL israsterized by the RIP 106. More specifically, the parallel control unit200 notifies the RIP 106 of the storage destination memory address ofthe DL with the transmission target page number included in thecompletion notification acquired so far. The RIP 106 acquires the DLstored in the relevant memory address and then rasterizes it. Then, upondetection of completion of the DL rasterization for one page, theparallel control unit 200 instructs the generation unit 213 serving as aDL thread to release the memory area for the relevant page allocated onthe DL storage memory.

In step S417, the parallel control unit 200 increments the transmissiontarget page number by one to enable transmitting the generated DL to theRIP 106 in the order of pages.

The above-described processing in steps S415 to S417 is equivalent totransmission control in which the parallel control unit 200 controls thepage order for the DL to be sent to the RIP 106 for rasterization. Inthis order control, even when the DL generation for the following page(for example, the third page) is completed before the DL generation forthe page which should be transmitted in the correct order of pages(preceding page, for example, the second page), the DL transmission forthe third page to the RIP 106 is suspended until the DL transmission forthe preceding page (second page) is completed. More specifically, theparallel control unit 200 delays the DL rasterization for the followingpage. As a result, the DLs are rasterized in suitable page order, andraster images are generated. The raster images are sent to the printerengine 108 in order of generation, and pages are printed in the correctorder of pages.

In step S409, the parallel control unit 200 determines whether the DLgeneration and the DL transmission to the RIP 106 are completed for allpages included in the PDL data. When the relevant processing iscompleted (YES in step S409), the processing exits this flowchart. Onthe other hand, when the relevant processing is not completed for allpages (NO in step S409), the processing returns to step S403.

The above-described processing enables the parallel control unit 200 toimplement control for switching between page parallel processing andpipeline parallel processing.

<Pipeline PDL Thread>

The following describes the processing of the PDL data interpretation inpipeline parallel processing assigned to an empty thread based on theinstruction in step S404, with reference to the flowchart illustrated inFIG. 5. By using as a trigger an instruction for an empty thread tofunction as a pipeline PDL thread, the processing of this flowchart isperformed by the pipeline PDL thread. Therefore, the processing entityis the interpretation unit 201 serving as a pipeline PDL thread.

In step S1102, the interpretation unit 201 interprets the PDL data of anuninterpreted object included in the page with the DL generation targetpage number. This interpretation result is written out to the workmemory area.

In step S1104, the interpretation unit 201 transmits the interpretationresult that has been written out in step S1102, to the buffer 204. Thistransmission is performed upon reception of a transmission permissionnotification from the pipeline DL thread (described below). Thetransmitted interpretation result is processed by a pipeline DL threadas described below.

In step S1105, the interpretation unit 201 determine whether the PDLdata interpretation is completed for all objects included in the pagewith the DL generation target page number. When the PDL datainterpretation is completed for all objects (YES in step S1105), theprocessing proceeds to step S1106. On the other hand, when the PDL datainterpretation is completed not for all objects (NO in step S1105), theprocessing returns to step S1102. In step S1102, the interpretation unit201 interprets the PDL data of another uninterpreted object.

In step S1106, the interpretation unit 201 waits for a DL generationcompletion notification from the pipeline DL thread. The interpretationunit 201 acquires the memory address (described below) included in theDL generation completion notification. Upon reception of the DLgeneration completion notification, the processing proceeds to stepS1107.

In step S1107, the interpretation unit 201 transmits the DL generationcompletion notification including the acquired memory address to theparallel control unit 200 which is implemented by a thread differentfrom a pipeline PDL thread and a pipeline DL thread. The DL generationcompletion notification also includes the page number of the generatedDL, and is received in step S406.

The above-described processing is performed by a pipeline PDL thread.

<Pipeline DL Thread>

The following describes the processing of the DL data generation inpipeline parallel processing assigned to an empty thread based on theinstruction in step S404, with reference to the flowchart illustrated inFIG. 6. By using as a trigger an instruction for an empty thread tofunction as a pipeline DL thread, the processing of this flowchart isperformed by the pipeline DL thread. Therefore, the processing entity isthe generation unit 203 serving as a pipeline DL thread.

In step S1201, the generation unit 203 acquires the result of the PDLdata interpretation for objects from the buffer 204.

In step S1202, the generation unit 203 generates a DL of the objectbased on the interpretation result acquired in step S1201. The generatedDL is stored in the DL storage memory. The generation unit 203 transmitsa transmission permission notification to the pipeline PDL thread. Thus,control is performed so that, after the interpretation result in thebuffer 204 has been processed, the following interpretation result isoverwritten to the buffer 204. When starting the DL generation for onepage, the generation unit 203 allocates a memory area having the maximumvalue of the DL data size for one page in the DL storage memory, andsequentially stores the generated DL in the memory area. As describedabove, during the DL generation, the generation unit 203 determineswhether the data size of the generated DL exceeds the maximum value ofthe DL data size for one page. When the maximum value is exceeded, thegeneration unit 203 performs the fall back processing.

In step S1203, the generation unit 203 determines whether the DLgeneration is completed for all objects included in the page with the DLgeneration target page number. When the DL generation is completed forall objects (YES in step S1203), the processing proceeds to step S1204.On the other hand, when the DL generation is not completed for allobjects (NO in step S1203), the processing returns to step S1201. Instep S1201, the generation unit 203 processes the interpretation resultstored in the buffer 204.

In step S1204, the generation unit 203 transmits a DL generationcompletion notification to the pipeline PDL thread. The DL generationcompletion notification is received in step S1106. The DL generationcompletion notification also includes the memory address for storing thegenerated DL for one page.

The above-described processing is performed by a pipeline DL thread.

<Flow of Page Parallel DL Generation>

The following describes the processing of the DL data generation in pageparallel processing assigned to an empty thread based on the instructionin step S412, with reference to the flowchart illustrated in FIG. 7. Byusing as a trigger an instruction for an empty thread to function as apage DL thread, the processing of this flowchart is performed by thepage DL thread. Therefore, the processing entity is the interpretationunit 211 and the generation unit 213 serving as page DL threads.

In step S1301, the interpretation unit 211 interprets the PDL data ofobjects included in the page with the DL generation target page number,and writes out the interpretation result to the work memory.

In step S1302, the generation unit 213 reads the interpretation resultwritten out to the work memory, and generates a DL of the object. Thegenerated DL is stored in the DL storage memory. When starting the DLgeneration for one page, the generation unit 213 allocates a memory areahaving the maximum value of the DL data size for one page in the DLstorage memory, and sequentially stores the generated DL in the memoryarea. As described above, during the DL generation, the generation unit213 determines whether the data size of the generated DL exceeds themaximum value of the DL data size for one page. When the maximum valueis exceeded, the generation unit 213 performs the fall back processing.

In step S1303, the generation unit 213 determines whether the DLgeneration is completed for all objects included in the page with the DLgeneration target page number. When the DL generation is completed forall objects (YES in step S1303), the processing proceeds to step S1304.On the other hand, when the DL generation is not completed for all pages(NO in step S1303), the processing returns to step S1301. In step S1301,the generation unit 213 interprets the PDL data of the following object.

In step S1304, the generation unit 213 transmits a DL generationcompletion notification to the parallel control unit 200. The DLgeneration completion notification includes the memory address forstoring the generated DL for one page and the page number of the DL.

The above-described page DL thread is performed for respective pages bya plurality of threads, making it possible to efficiently perform the DLgeneration.

As described above, by switching between pipeline parallel processingand page parallel processing, it is possible to efficiently parallelizeprocessing by a multi-core CPU both on the single-page PDL data and themulti-page PDL data.

Although the above-described processing is pipeline parallel processing,in short, it is meaningful to perform parallel processing also on thefirst page. For example, for the first page, the thread 1 may convertthe first object included in the PDL data into a DL, and the thread 2may convert the second object into a DL. However, in such objectparallel processing, since the timing of completion of the DL generationfor objects is different for each object, it is necessary to control theorder of storing the generated DLs of objects.

In pipeline parallel processing, on the other hand, since a plurality ofthreads performs pipeline processing on one object, there is anadvantage that it is not necessary to be conscious of the order ofstoring DLs of objects.

In the first exemplary embodiment, to acquire effects ofmulti-core-based (multi-threaded) parallel processing regardless of thenumber of pages of the PDL data received from an external apparatus,pipeline parallel processing is performed on the first page and pageparallel processing is performed on the second and subsequent pages.

However, in some cases of a plurality of pages, performing page parallelprocessing from the first page provides larger effects of parallelprocessing. In particular, the PDL data of the even number of pagesprovides larger effects.

For example, in case of 2-page PDL data, performing the DL generationfor the first and the second pages through page parallel processingprovides larger effects of multi-threaded (multi-core-based) parallelprocessing.

In the present exemplary embodiment, a configuration for determiningwhether processing is to be performed with pipeline parallel processingor page parallel processing depending on the number of pages of the PDLdata will be described below with reference to FIG. 8. In the followingexemplary embodiment, redundant descriptions of elements identical tothose in the first exemplary embodiment will be omitted.

The flowchart illustrated in FIG. 8 differs from the flowchartillustrated in FIG. 4 according to the first exemplary embodiment inthat the processing in step S402 is added and that the processing instep S403 is changed to step S403-1. Only these differences will bedescribed below.

In step S402, the parallel control unit 200 interprets the PDL data todetermine the total number of pages of the PDL data received from anexternal apparatus. An example of a method for determining the totalnumber of pages will be described below.

For example, the parallel control unit 200 counts the total number ofpage break commands while sequentially reading the PDL data from the topto the end. Since a page break command indicates the end of a page,counting the total number of page break commands enables acquiring thetotal number of pages of the PDL data.

Alternatively, when the PDL data includes header information, theparallel control unit 200 reads the header information and, when theheader information describes the total number of pages of the PDL data,acquires the total number of pages.

Alternatively, the parallel control unit 200 may determine the PDL typeof the PDL data and determine the total number of pages based on the PDLtype. For example, when the PDL type is Joint Photographic Experts Group(JPEG), Tag Image File Format (TIFF), or the like indicating asingle-page image, it is desirable to perform pipeline parallelprocessing instead of page parallel processing. Therefore, when the PDLtype is JPEG, TIFF, or the like, the parallel control unit 200determines the total number of pages as 1.

In step S403-1, based on the total number of pages determined in stepS402, the parallel control unit 200 determines whether the total numberof pages is 1. When the total number of pages is 1 (YES in step S403-1),the processing proceeds to step S404. On the other hand, when the totalnumber of pages is more than 1 (NO in step S403-1), the processingproceeds to step S410.

As described above, when the single-page PDL data is assumed, theparallel control unit 200 performs pipeline parallel processing on thefirst page. When the multi-page PDL data is assumed, the parallelcontrol unit 200 performs page parallel processing on the first page inparallel with the second page. This enables improving effects ofparallel processing.

(Other Exemplary Embodiment)

Although, in the above-described exemplary embodiment, pipeline parallelprocessing is performed only on the first page (starting page) of thePDL data, pipeline parallel processing may also be performed on the lastpage of the PDL data.

Although, in the above-described exemplary embodiment, pipeline parallelprocessing or page parallel processing is suitably selected in the caseof the DL generation based on the PDL data, a similar concept is alsoapplicable to the raster image generation based on the PDL data.

Although, in the image forming apparatus according to theabove-described exemplary embodiment, one RIP (RIP 106) sequentiallyperforms the DL rasterization on a page basis, a plurality of RIPs maybe employed instead of the RIP 106. As an example, a plurality of RIPsmay parallelly perform the DL rasterization for different areas in thesame page based on a generated DL. For example, a first RIP rasterizesthe first band area of a generated page by using the DL of the relevantpage, and, in parallel with the DL rasterization by the first RIP, asecond RIP rasterizes the second band of the relevant page by using theDL of the relevant page. Performing processing in this way enablesrecovering the delay due to the suspended DL generation through theprocessing speed improvement for the parallel rasterization of pages.

As another example, a plurality of RIPs may parallelly perform the DLrasterization for respective different pages. For example, the first RIPperforms the DL rasterization for the preceding page, and the second RIPperforms the DL rasterization for the following page in parallel withthe DL rasterization by the first RIP. Even in such a configuration, ifthe DL generation for the following page is completed before the DLgeneration for the preceding page, the parallel control unit 200 delaysthe rasterization of the DL of the following page which has beengenerated before the DL of the preceding page, similar to theabove-described exemplary embodiment. However, in this configuration,the first and the second RIPs start the DL rasterization for thepreceding and the following pages not upon completion of the DLrasterization for the preceding page but upon completion of the DLgeneration for the preceding page. Performing processing in this wayenables correcting the page order in the DL generation and acquiringeffects of the rasterization speed improvement through parallelrasterization. In this parallel rasterization, if the DL rasterizationof the following page is completed before the DL rasterization for thepreceding page, the parallel control unit 200 instructs the second RIPto hold the raster image for the one following page to suspend the DLrasterization for the further following page. Then, upon completion ofthe DL rasterization for the preceding page by the first RIP, the firstRIP transmits the raster image of the preceding page to the printerengine 108, and the second RIP subsequently transmits the raster imageof the following page to the printer engine 108. With thisconfiguration, even if the order of the DL generation for page isreversed, it is possible to acquire effects of the rasterization speedimprovement through parallel rasterization while restraining thecontinuous storage of raster images of a plurality of pages, thusachieving printing in the correct order of pages.

Other Embodiments

Embodiment(s) of the present invention can also be realized by acomputer of a system or apparatus that reads out and executes computerexecutable instructions (e.g., one or more programs) recorded on astorage medium (which may also be referred to more fully as a‘non-transitory computer-readable storage medium’) to perform thefunctions of one or more of the above-described embodiment(s) and/orthat includes one or more circuits (e.g., application specificintegrated circuit (ASIC)) for performing the functions of one or moreof the above-described embodiment(s), and by a method performed by thecomputer of the system or apparatus by, for example, reading out andexecuting the computer executable instructions from the storage mediumto perform the functions of one or more of the above-describedembodiment(s) and/or controlling the one or more circuits to perform thefunctions of one or more of the above-described embodiment(s). Thecomputer may comprise one or more processors (e.g., central processingunit (CPU), micro processing unit (MPU)) and may include a network ofseparate computers or separate processors to read out and execute thecomputer executable instructions. The computer executable instructionsmay be provided to the computer, for example, from a network or thestorage medium. The storage medium may include, for example, one or moreof a hard disk, a random-access memory (RAM), a read only memory (ROM),a storage of distributed computing systems, an optical disk (such as acompact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™),a flash memory device, a memory card, and the like.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2015-093537, filed Apr. 30, 2015, and No. 2016-032473, filed Feb. 23,2016, which are hereby incorporated by reference herein in its entirety.

What is claimed is:
 1. An image forming apparatus comprising: a printerengine configured to print rasterized pages; and at least one controllerhaving one or more processors executing programs stored in a memory, theat least one controller being configured to function as: a receivingunit configured to receive PDL data including a plurality of pages; aplurality of processing units configured to generate, on a page basis,intermediate data of the plurality of pages based on the PDL data; and arasterizing unit configured to rasterize the intermediate data of theplurality of pages generated by the plurality of processing units;wherein, in a case where generation of intermediate data of a followingpage is completed before generation of intermediate data of a precedingpage, a second rasterization of the intermediate data of the followingpage by the rasterizing unit is controlled so that the secondrasterization of the intermediate data of the following page is delayeduntil a first rasterization of the intermediate data of the precedingpage is completed, and the second rasterization of the intermediate dataof the following page by the rasterizing unit is executed after thefirst rasterization of the intermediate data of the preceding page iscompleted, wherein, a first raster image generated by the firstrasterization is printed on a first sheet and a second raster imagegenerated by the second rasterization is printed on a second sheet whichis different from the first sheet.
 2. The image forming apparatusaccording to claim 1, wherein, in the case where the generation of theintermediate data of the following page is completed before thegeneration of the intermediate data of the preceding page, therasterizing unit suspends the rasterization of the intermediate data ofthe following page, and, before the rasterization of the intermediatedata of the following page, completes the rasterization of theintermediate data of the preceding page which has been generated afterthe intermediate data of the following page.
 3. The image formingapparatus according to claim 1, wherein the plurality of processingunits generates intermediate data of respective different pages.
 4. Theimage forming apparatus according to claim 1, further comprising amanagement unit configured to manage a page number, intermediate data ofa page with the page number being to be rasterized by the rasterizingunit, wherein, in a case where the generation of the intermediate dataof the following page is completed before a generation of theintermediate data of the page with the page number managed by themanagement unit, the rasterizing unit delays the rasterization of theintermediate data of the following page till completion of a generationand a rasterization of intermediate data of each of pages from the pagewith the page number to a page immediately before the following page. 5.The image forming apparatus according to claim 1, further comprising amemory area having a predetermined data size, configured to store theintermediate data of respective pages generated by the plurality ofprocessing units, wherein at least one of the plurality of processingunits is controlled to suspend a generation of intermediate data ofremaining pages based on a free capacity of the memory area.
 6. Theimage forming apparatus according to claim 5, wherein, in a case wherethe free capacity of the memory area is smaller than a threshold value,the at least one processing unit is controlled to suspend the generationof the intermediate data of the remaining pages.
 7. The image formingapparatus according to claim 1, wherein at least one of the processingunits is controlled to suspend a generation of intermediate data ofremaining pages based on an amount of unrasterized intermediate data outof generated intermediate data of pages.
 8. The image forming apparatusaccording to claim 7, wherein the amount is a total size of theunrasterized intermediate data out of the generated intermediate data ofthe pages or a number of pages of the unrasterized intermediate data outof the generated intermediate data of the pages, and wherein, in a casewhere the amount is equal to or greater than a threshold value, the atleast one processing unit is controlled to suspend the generation of theintermediate data of the remaining pages.
 9. The image forming apparatusaccording to claim 1, wherein the rasterization unit comprises: a firstunit configured to perform, by using intermediate data of one page, arasterization for a first area in the page; and a second unit configuredto perform, by using the intermediate data, a rasterization for a secondarea in the page, different from the first area in parallel with therasterization for the first area.
 10. The image forming apparatusaccording to claim 1, wherein the rasterization unit comprises: a firstunit configured to perform, by using intermediate data of a first page,a rasterization for the first page; and a second unit configured toperform, by using intermediate data of a second page different from thefirst page, a rasterization for the second page in parallel with therasterization for the first page.
 11. The image forming apparatusaccording to claim 1, wherein, when generating intermediate data basedon the PDL data on a page basis, the plurality of processing unitsperforms: parallelly generating, for a predetermined page of the PDLdata, intermediate data of objects included in the page by using aplurality of the processing units; and parallelly generating, for a pageother than the predetermined page, intermediate data of objects includedin the page by using a different processing unit on a page basis. 12.The image forming apparatus according to claim 11, wherein, for thepredetermined page, one of the plurality of processing units interpretsPDL data of objects included in the page, and wherein, for thepredetermined page, another one of the plurality of processing unitsgenerates intermediate data of the objects based on an interpretationresult.
 13. The image forming apparatus according to claim 12, wherein,for the predetermined page, the one processing unit transmits theinterpretation result to a buffer from a memory in which theinterpretation result is stored, and wherein, for the predeterminedpage, the another processing unit acquires the interpretation resulttransmitted to the buffer, and generates the intermediate data.
 14. Theimage forming apparatus according to claim 13, wherein, for the pageother than the predetermined page, the one processing unit interpretsPDL data of objects included in a certain page, and generatesintermediate data of the objects based on an interpretation result, andwherein, for the page other than the predetermined page, the anotherprocessing unit interprets PDL data of objects included in another page,and generates intermediate data of the objects based on aninterpretation result.
 15. The image forming apparatus according toclaim 14, wherein, for the page other than the predetermined page, theone processing unit acquires the interpretation result without thetransmission from the memory in which the interpretation result isstored, and generates the intermediate data.
 16. The image formingapparatus according to claim 11, wherein, in a case where a total numberof pages of the received PDL data is determined to be one, the pluralityof processing units handles all pages included in the PDL data as thepredetermined page.
 17. The image forming apparatus according to claim11, wherein, in a case where a total number of pages of the received PDLdata is determined to be more than one, the plurality of processingunits handles all pages included in the PDL data as the page other thanthe predetermined page.
 18. The image forming apparatus according toclaim 16, wherein the total number of pages is acquired uponinterruption of the received PDL data.
 19. The image forming apparatusaccording to claim 16, wherein the total number of pages is regarded asone upon determination of a PDL type of the received PDL data.
 20. Theimage forming apparatus according to claim 11, further comprising adetermination unit configured to determine whether to handle all pagesincluded in the PDL data as the predetermined page or as the page otherthan the predetermined page, based on a PDL type of the received PDLdata.
 21. The image forming apparatus according to claim 11, wherein thepredetermined page is a starting page of the PDL data.
 22. A method forcontrolling an image forming apparatus having a plurality of processingunits, the method comprising: receiving PDL data including a pluralityof pages; controlling the plurality of respective different processingunits to generate, on a page basis, intermediate data of the pluralityof pages based on the PDL data; rasterizing, on a page basis, thegenerated intermediate data of the plurality of pages; and printing therasterized pages by using a printer engine, wherein, in a case where ageneration of intermediate data of a following page is completed beforea generation of intermediate data of a preceding page, the controllingdelays a second rasterization of the intermediate data of the followingpage by the rasterizing until a second rasterization of the intermediatedata of the preceding page is completed, and the second rasterization ofthe intermediate data of the following page by the rasterizing step isexecuted after a first rasterization of the intermediate data of thepreceding page is completed, wherein, a first raster image generated bythe first rasterization is printed on a first sheet and a second rasterimage generated by the second rasterization is printed on a second sheetwhich is different from the first sheet.